package com.api.view.userInfo;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.base.util.DFA;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang.StringUtils;

@ApiModel
public class UserNewsView {
    @ApiModelProperty("id")
    private Integer id;
    @ApiModelProperty("用户id")
    private Integer userId;
    @ApiModelProperty("用户昵称")
    private String userNickName;
    @ApiModelProperty("用户头像")
    private String userHeadImg;
    @ApiModelProperty("用户等级 0普通 1艺术家")
    private Integer state;
    @ApiModelProperty("是否是vip 0不是 1是")
    private Integer isVip;
    @ApiModelProperty("是否已关注 0未关注 1已关注")
    private Integer type;
    @ApiModelProperty("已关注的时候的关注id")
    private Integer userLikeId;
    @ApiModelProperty("标题")
    private String title;
    @ApiModelProperty("内容图文json")
    private Object info;
    @ApiModelProperty("组图")
    private String imgs;
    @ApiModelProperty("评论数量")
    private Integer comCount;
    @ApiModelProperty("点赞数量")
    private Integer dzCount;
    @ApiModelProperty("发布时间")
    private String msgTime;
    @ApiModelProperty("1.艺圈新鲜事 2.我的关注")
    private Integer focusType;
    @ApiModelProperty("是否点赞 0未点赞 1点赞")
    private Integer dzType;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUserNickName() {
        return userNickName;
    }

    public void setUserNickName(String userNickName) {
        this.userNickName = userNickName;
    }

    public String getUserHeadImg() {
        return userHeadImg;
    }

    public void setUserHeadImg(String userHeadImg) {
        this.userHeadImg = userHeadImg;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getImgs() {
        return imgs;
    }

    public void setImgs(String imgs) {
        this.imgs = imgs;
    }

    public Integer getComCount() {
        return comCount;
    }

    public void setComCount(Integer comCount) {
        this.comCount = comCount;
    }


    public String getMsgTime() {
        return msgTime;
    }

    public void setMsgTime(String msgTime) {
        this.msgTime = msgTime;
    }

    public Integer getFocusType() {
        return focusType;
    }

    public void setFocusType(Integer focusType) {
        this.focusType = focusType;
    }

    public Integer getUserLikeId() {
        return userLikeId;
    }

    public void setUserLikeId(Integer userLikeId) {
        this.userLikeId = userLikeId;
    }

    public Integer getDzCount() {
        return dzCount;
    }

    public void setDzCount(Integer dzCount) {
        this.dzCount = dzCount;
    }

    public Integer getIsVip() {
        return isVip;
    }

    public void setIsVip(Integer isVip) {
        this.isVip = isVip;
    }

//    public Object getInfo() {
//
//        JSONArray array = (JSONArray) info;
//        for (int i = 0; i < array.size(); i++){
//            JSONObject json = array.getJSONObject(i);
//            String content = json.getString("info");
//            if (StringUtils.isNotBlank(content)){
//                json.put("info", DFA.replaceKeys(content));
//            }
//        }
//        return array;
//    }


    public Object getInfo() {
        return info;
    }

    public void setInfo(Object info) {
        this.info = info;
    }

    public Integer getDzType() {
        return dzType;
    }

    public void setDzType(Integer dzType) {
        this.dzType = dzType;
    }
}
